/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.nys.conci.base.validador;

import com.nys.conci.base.validador.anotacion.Clave;
import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;

/**
 *
 * @author gbsys
 */
public class ClaveValidator implements ConstraintValidator<Clave, String> {

    @Override
    public void initialize(Clave constraintAnnotation) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    @Override
    public boolean isValid(String value, ConstraintValidatorContext context) {
        if (!value.trim().isEmpty() && value.trim().length()>=7){
            return true;
        }else {
            return false;
        }
    }
    
}
